package com.nondo.rdp.finance.service.analysis;

import com.nondo.rdp.auth.domain.User;
import com.nondo.rdp.auth.endpoint.model.Page;
import com.nondo.rdp.finance.domain.analysis.Analysis;
import com.nondo.rdp.finance.domain.analysis.AnalysisCollection;

public interface AnalysisCollectionService {
    /**
     * 保存分析收藏
     *
     * @param analysisCollection
     */
    AnalysisCollection save(AnalysisCollection analysisCollection);

    /**
     * 根据主键ID删除分析收藏
     *
     * @param id
     */
    void delete(Long id);

    /**
     * 根据主键ID查询分析收藏
     *
     * @param id
     * @return
     */
    AnalysisCollection findOne(Long id);

    /**
     * 根据分析ID和用户ID查找收藏
     *
     * @param analysis
     * @param user
     * @return
     */
    AnalysisCollection findByAnalysisAndUser(Analysis analysis, User user);

    /**
     * 分页查询分析列表
     *
     * @param page
     * @param analysisCollection
     * @return
     */
    Page<AnalysisCollection> findAll(Page<AnalysisCollection> page, AnalysisCollection analysisCollection);
}
